package edu.sctu.xialei.june.day20150608one;

import edu.sctu.xialei.june.day20150608one.appbean.PeopleAppbean;
import edu.sctu.xialei.june.day20150608one.data.SetPeopleData;
import edu.sctu.xialei.june.day20150608one.util.BaoGuoDeth;
import edu.sctu.xialei.june.day20150608one.util.CardDeth;

public class RunMain {

	public static void main(String[] args) {
		PeopleAppbean people = new SetPeopleData().setPeopleData().get(1);
		if (people.isIs_card()) {
		if (new BaoGuoDeth(people).chaBaoGuo()) {
		System.out.println("包裹有违禁品");
		} else {
		if (new BaoGuoDeth(people).chaWater()) {
		System.out.println("水有问题");
		} else {
		if (people.getPice() > 2) {
		System.out.println("进站");

		} else {
		new CardDeth().setPrice(10, people);
		System.out.println("充值成功");
		}
		if (people.getPice() >= new CardDeth().getPrice(
		people.getStart(), people.getEnd())) {
		System.out.println("出站，余额为:"
		+ (people.getPice() - new CardDeth().getPrice(
		people.getStart(), people.getEnd())));
		} else {
		new CardDeth().setPrice(10, people);
		System.out.println("充值成功");
					}
			}

		}
		} else {
	        System.out.println("买票");
		if (new BaoGuoDeth(people).chaBaoGuo()) {
		System.out.println("包裹有违禁品");
		} else {
		if (new BaoGuoDeth(people).chaWater()) {
		System.out.println("水有问题");
		} else {
		System.out.println("出站");
				}
			}
		}
	}

}
